// Test comment
#ifndef DEF_FENETRE
#define DEF_FENETRE

#include <QtGui>
#include <qextserialport.h>

class GWindow : public QMainWindow
{
    Q_OBJECT

    public:
    GWindow(int largeur, int hauteur);

    private:
    QPushButton *g_openComButton;
    QLabel      *g_comLabel;
    QPushButton *g_closeComButton;
    QLabel      *g_embeddedSwLabel;
    QLabel      *g_embeddedSwValLabel;
    QLabel      *g_motorTypeLabel;
    QLabel      *g_motorTypeValLabel;
    QLabel      *g_currentPositionLabel;
    QLabel      *g_currentPositionValLabel;
    QLabel      *g_temperatureLabel;
    QLabel      *g_temperatureValLabel;
    QPushButton *g_currentPositionPushButton;
    QLabel      *g_stepIncrementLabel;
    QSpinBox    *g_stepIncrementSpinBox;
    QPushButton *g_setFocusButton;
    QComboBox   *g_portList;
    QGridLayout *g_layout;
    QextSerialPort *g_comPort;

    private slots:
    void g_initializeComPortList();
    void g_openPort();
    void g_closePort();
    void g_refreshGuiData();
    void g_sendPosRequest();
    void g_sendVersionRequest();
    void g_sendMotorTypeRequest();
    void g_sendPosValue();
    void g_sendTempRequest();
    QString g_receivedMsg();
    QString g_extractData(QString receivedMsg);

};

#endif
